package dao.impl;

import dao.UserDao;
import pojo.User;
import util.DBHelper;

import java.util.ArrayList;

public class UserDaoimpl implements UserDao {
    DBHelper db=new DBHelper();
    User user=new User();
    @Override
    public int insertUser(User user) {
        return 0;
    }

    @Override
    public ArrayList selectUsername(User user) {
        String sql="select * from user where account=? and password=? ";
        return db.query(sql,User.class,user.getAccount(),user.getPassword());
    }
    @Override
    public ArrayList selectByIdcard(String Idcard) {
        String sql="select * from user where idcard_no=?";
        return db.query(sql,User.class,Idcard);
    }
}
